﻿using System.Data;
using System.Data.SqlClient;

namespace UniversityStudentManagemnetSystem.DAO.Gateway
{
    public class SemesterGateway:Gateway
    {
        public DataTable GetSemester()
        {
            string selectQuery = string.Format("select * from t_Semester");
            SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(selectQuery, GetConnectionString());
            DataSet myDataset = new DataSet();
            sqlDataAdapter.Fill(myDataset, "SemesterTable");
            DataTable myDataTable = myDataset.Tables["SemesterTable"];
            return myDataTable;
        }
    }
}